home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
Ss-Sz
/
Student HomeCard™ 3.0.cpt
/
Student HomeCard™ 3.0
/
For 12" RGB Monitors
/
Home
/
stack_-1.xml
< prev
next >
Wrap
Extensible Markup Language
|
1992-02-21
|
25KB
|
26 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>5</cardCount>
<cardID>6381</cardID>
<listID>5277</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><true /></cantAbort>
<cardSize>
<width>512</width>
<height>384</height>
</cardSize>
<script>∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞Student HomeCard™ (A hybrid/mutation of the Browser Home Stack included with HyperCard™)Version 3.0©Copyright 1992 by ATG, Inc.All Rights ReservedThanks for the XCMD's and XFCN's to:Jim HendersonGEnie:JDHENDERSON(This Next Guy Is A HyperCard Guru. Many, many thanks.)Steve Drazga'Portions ©1988 Steve Drazga'Jim Spencer1280 Westminster Street #302St. Paul, MN 55101GEnie: JPSPENCERSteve Maller, Apple Computer.AppleLink: maller1 • Delphi: stevemaller • MCI Mail: smallerGuy KuoUNSOMGEnie: G.KUOHeizer Software & Dialogger Pro. Way CoolMODALDIALOG XFCN version 1.0.3PASSWORD XFCN version 1.0.1Kevin Calhoun∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞----- Startup/Resume Scripts: ---------------------------------------------on startUpglobal SuperU,NamesOfDas, AmIHome,whatuser,SuperStudentChooser,SuperStudentControlglobal AllCards,IsSystem7,ShowFinderset lockscreen to trueset lockmessages to truepush cardgo homego cd id 6381if there is a cd field id 273thenput cd field id 273 of cd id 6381 into SuperStudentChooserput cd field id 274 of cd id 6381 into SuperStudentControlput cd field "Hide Finder" of cd id 6381 into ShowFinderend ifpop cardset lockmessages to falseset lockscreen to falseset userlevel to 2-- Requires handler: getHomeInfo-- gets and sets the user's preferencesgetHomeInfocheckForMissingFontspass startUp -- so others can use itend startUpon getHomeInfo-- Needs: User preferences card of the home stack-- configures HyperCard to the user specified preferencesglobal Stacks,Applications,Documents,UserNameif short name of this stack is not "Home" then -- ∆lock screenset lockRecent to trueset lockMessages to truepush this card -- remember where we arego home -- will take us to the home stack in case we're not thereput false into stackIsHomeelse put true into stackIsHomeput (cd fld "User Name" of cd "User Preferences") into UserName-- load the search path globalsput bg fld "Paths" of cd "Stacks" into Stacksput bg fld "Paths" of cd "Applications" into Applicationsput bg fld "Paths" of cd "Documents" into Documentsif not stackIsHome thenpop card -- return to where we wereset lockRecent to false -- clean up for exitset lockMessages to falseunlock screenend ifend getHomeInfoon resume-- Requires handler: getHomeInfo-- gets and sets user preferences upon returningglobal SuperU, AmIHomegetHomeInfo-- Requires handler: getHomeInfo-- gets and sets user preferences upon returningcreateMenuAdministrationLockSHCpass resume -- so others can use itend resumeon ChangeAppleset name of menuItem 1 of menu "Apple" to "About Student HomeCard™"set the menumessage of menuitem 1 of menu 1 to aboutSHCend ChangeApple----- Utility Scripts --------------------------------------------on arrowkeyglobal superUif superU is falsethenbeepbeepelsepass arrowkeyend ifend arrowkeyon disallowInterruption -- so can't stop scripts while runningset cantAbort of this stack to trueend disallowInterruptionon allowInterruption -- so can stop scripts while runningset cantAbort of this stack to falseend allowInterruptionon setUserLevelFive -- some things need this userLevelglobal SvLvlput the userLevel into SvLvlset the userLevel to 5end setUserLevelFiveon restoreUserLevel -- use after setUserLevelFiveglobal SvLvlif SvLvl is a number then set the userLevel to SvLvlend restoreUserLevel----- Font Adjustment Scripts: ----------------------------------function checkHCFont theFont,pointSizes-- Requires XFCN: FontExists-- returns a list of font sizes needed but not in the systemput empty into missing-- steps through each point size passed inrepeat with count = 1 to the number of items in pointSizesput item count of pointSizes into theCurrentPtSizeif not FontExists(theFont,theCurrentPtSize) -- if can't find itthen put theCurrentPtSize into last item of missingend repeatif missing is not empty thenput theFont & space before missingput return after missingend ifreturn missingend checkHCFonton checkForMissingFonts-- Requires handler: checkHCFont-- check to see if the fonts needed for the stacks are-- installed in the system. Inform the user if they're not.get checkHCFont("Courier","10,12") & checkHCFont("Geneva","10,14") & ¬checkHCFont("Palatino","10,12,14,18,24") & ¬checkHCFont("Helvetica","18,24") -- these are fonts needed by this stackif it is empty then exit checkForMissingFontselse put it into missingFontsbeep 1-- this dialog informs the user which fonts are missinganswer "These font(s) are missing from your system:" & ¬return & return & missingFonts & return & ¬"For text to display correctly in the stacks, make sure you have" ¬&& "installed the fonts included with HyperCard." -- ∆end checkForMissingFonts--------------------------------------------------------------------------- Here's Where The Fun Begins!!! © 1991 John A. Douglas, ATG ----------------------------------------------------------------------------on createTheMenus resuming-- Requires function handlers: createMenuAdministrationItems,createMenuAdministrationMsgs-- creates the "Administration" menu - called from the scripts of this stackif resuming is "true" and "Administration" is in the menusthen delete menu "Administration" -- ∆ not our Administration menuif "Administration" is in the menus then exit createTheMenus -- ∆show menuBar -- needed by the "Administration" menucreate menu "Administration" -- ∆put createMenuAdministrationItems() into menu "Administration" with menuMsgs createMenuAdministrationMsgs() -- ∆end createTheMenuson createMenuAdministrationif there is a menu "Administration" then exit createMenuAdministrationcreate menu "Administration"put createMenuAdministrationItems() into menu "Administration" with menuMsg createMenuAdministrationMsgs()end createMenuAdministrationfunction createMenuAdministrationItemsreturn "Modify Student HomeCard™..." & return & ¬"Lock Student HomeCard™..." & return & ¬"Change Password..." & return & ¬"-" & return & ¬"Create A Stack Button..." & return & ¬"Create An Application/Document Button..." & return & ¬"Create An Apple Menu Button..." & return & ¬"Create An Apple IIe Startup Button" & return &¬"Create A ProDos Application Button..." & return &¬"Create A New Card..." & return & ¬"-" & return & ¬"Chooser/Control Panel Access..." & return & ¬"Hide Finder Under System 7" & return &¬"-" & return & ¬"What Else Can I Do?" & returnend createMenuAdministrationItemsfunction createMenuAdministrationMsgsreturn "ModifySHC" & return & ¬"LockSHC" & return & ¬"ChangePass" & return & ¬"" & return & ¬"MakeStackButton" & return & ¬"MakeAppButton" & return & ¬"MakeDA" & return & "AppleIIE" & return & "PDOSAPP" & return & "CreateNewCard" & return & ¬"" & return & ¬"ChangeStudentDAccess" & return & ¬"Sys7FinderShow" & return & ¬"" & return & ¬"WhatElse"end createMenuAdministrationMsgson Sys7FinderShowglobal ShowFinderif ShowFinder is truethenput false into cd field "Hide Finder" of cd id 6381put false into ShowFinderelseput true into cd field "Hide Finder" of cd id 6381put true into ShowFinderend ifend Sys7FinderShow--------------------------------------------------------------------------- Password Execution-----------------------------------------------------------------------on MakePopUpListglobal AllCards,SuperUput "" into AllCardsset lockscreen to truepush cardgo cd id 6381if SuperU is truethen put "Edit name of this card..." & return & "-" & return after AllCardsput "Main Card" && " " & return after AllCardsrepeat with N = 1 to (Number of cards of this bg -1)go next card of this bgput line 1 of bg field id 96 & return after AllCardsend repeatpop cardset lockscreen to falseend MakePopUpListon AskPassglobal SuperUput line 1 of cd field "Password Field" of cd id 6381 into tempestif SuperU is truethenanswer "You can already do that! To lock Student HomeCard™, select Lock Student HomeCard™... from the Administration menu." with "OK"exit AskPassend ifglobal dResultput return into CR-- --------------------------------- Items in Dialog: "SHCPassword"-- --------------------------------- 1 ◊ Button "OK"-- 2 ◊ Button "Cancel"-- 3 ◊ Static Text ""-- 4 ◊ Static Text "Enter Admin Password:"-- 5 ◊ Protected Editable Text ""-- 6 ◊ Picture "129"-- -------------------------------put Dialoger("SHCPassword"& return & "on PassWordHit"¬, "5◊protected"¬) into dResultif line 2 of dResult ≠ ""thenexit AskPasselseput true into SuperUset userlevel to 5exit AskPassend ifend AskPasson ChangePassglobal dResultput return into CR-- --------------------------------- Items in Dialog: "Change Password"-- --------------------------------- 1 ◊ Button "OK"-- 2 ◊ Button "Cancel"-- 3 ◊ Static Text "Enter Old Password:"-- 4 ◊ Protected Editable Text ""-- 5 ◊ Picture "2747"-- 6 ◊ Protected Editable Text ""-- 7 ◊ Static Text "Enter New Password In"-- 8 ◊ Protected Editable Text ""-- 9 ◊ Static Text ""-- -------------------------------put Dialoger("Change Password"& return & "on CPassWordHit"¬, "1◊Inactivate"¬, "4◊protected"¬, "6◊protected"¬, "8◊protected"¬) into dResultif line 2 of dResult ≠ ""then exit ChangePasselse put line 8 of dResult into cd field "Password Field" of cd id 6381end ChangePasson LockSHCglobal SuperU,AllCards,IsSystem7,ShowFinderif the systemversion ≥ 7.0thenput cd field "Hide Finder" of cd id 6381 into ShowFinderput true into IsSystem7end ifif ShowFinder is falsethen close "finder"put false into SuperUMakePopUpListgo card id 6381set userlevel to 2disable menuitem 14 of menu "File"disable menu "Go"disable menu "Edit"repeat with x = 2 to 14disable menuitem x of menu "Administration"end repeatend LockSHCon ModifySHCglobal SuperU,ShowFinderAskPassif SuperU is truethenenable menuitem 14 of menu "File"enable menuitem 16 of menu "File"enable menu "Go"enable menu "Edit"enable menuitem 2 of menu "Administration"enable menuitem 3 of menu "Administration"enable menuitem 5 of menu "Administration"enable menuitem 6 of menu "Administration"enable menuitem 7 of menu "Administration"enable menuitem 8 of menu "Administration"enable menuitem 9 of menu "Administration"enable menuitem 10 of menu "Administration"enable menuitem 12 of menu "Administration"enable menuitem 13 of menu "Administration"enable menuitem 14 of menu "Administration"if ShowFinder is falsethen set checkmark of menuitem 13 of menu "Administration" to trueend ifend ModifySHCon whatelseanswer tab & "If you learn how to write HyperTalk™ scripts, the sky's the limit. Books are commercially available, or you can get a developer copy"¬& " from Claris Corporation (1-800-544-8554), your local computer dealer, etc." & return & "You won't regret it!" with "OK"end whatelse--------------------------------------------------------------------------- Change Color Depth...-----------------------------------------------------------------------on ColorHit dialog, itemhitglobal CDepthNum,CanColorif itemhit = 0thendchanger dialog, "5◊SingleSelection"dchanger dialog, "5◊Select" && CDepthNumif canColor is not truethen dchanger dialog, "7◊Hide"end ifend ColorHit--------------------------------------------------------------------------- Add a document/icon button-----------------------------------------------------------------------on MakeAppButtonglobal fullPathhide msganswer "What do you wish to create a button for:" with "Document" or "Application" or "Cancel"if it is "Cancel" then exit MakeAppButtonif it is "Document"thenDocumentItelse if it is "Application"thenput "Select an application to launch:" into fooanswer file foo of type APPLput it into fullpathApplicationItend ifend MakeAppButtonon DocumentItglobal fullPathglobal TheName,buttonScriptput "Select an application to launch the document:" into fooanswer file foo of type APPLput it into fullpathput LastPathItem(fullpath) into Applrepeat with i = length of FullPath down to 1if character i of FullPath is ":"thenexit repeatelsedelete character i of FullPathend ifend repeatput return & fullpath after bg field id 6 of card "Applications"put "Select a document for" && Appl && "to launch:" into fooanswer file fooput it into fullpathput FullPath into longnameput LastPathItem(fullpath) into shortnameput ":" into stackmeif fullPath = empty then exit DocumentItput LastPathItem(fullpath) into TheNamerepeat with i = length of FullPath down to 1if character i of FullPath is ":"thenexit repeatelsedelete character i of FullPathend ifend repeatput return & fullpath after bg field id 6 of card "Documents"doMenu "New Button"hide button "New Button"show button "New Button"set style of button "New Button" to transparentset icon of button "New Button" to 12195choose button toolput ((the number of chars of thename) *6) into thewidthselect button "New Button"set rect of button "New Button" to 122,207,(122 + thewidth + 5),255set autohilite of button "New Button" to trueset name of button "New Button" to TheNamechoose the browse toolshow bg button id 90put "Drag the new button where you want it and click the DONE Button"-- now construct temporary script for the new buttonput "on mouseStilldown" & return into buttonScriptput "put the name of me into tempname" & return after buttonscriptput "dragon " & tempname & return after buttonScriptput "end mouseStilldown" & return after buttonScriptset script of button TheName to buttonScript-- now construct script for the new buttonput "on mouseUp" & return into buttonScriptput "open " & quote & theName & quote && "with" && quote & appl & quote & return after buttonScriptput "end mouseUp" & return after buttonScriptend DocumentIton ApplicationItglobal fullPathglobal TheName,buttonScriptput FullPath into longnameput LastPathItem(fullpath) into shortnameput ":" into stackmeput getAppIcon(longname,shortname,stackme) into IconToGrabif fullPath = empty then exit ApplicationItput LastPathItem(fullpath) into Applrepeat with i = length of FullPath down to 1if character i of FullPath is ":"thenexit repeatelsedelete character i of FullPathend ifend repeatput return & fullpath after bg field id 6 of card "Applications"doMenu "New Button"hide button "New Button"put Appl into TheNameshow button "New Button"set style of button "New Button" to transparentset icon of button "New Button" to IconToGrabchoose button toolput ((the number of chars of thename) *6) into thewidthselect button "New Button"set rect of button "New Button" to 122,207,(122 + thewidth + 5),255set autohilite of button "New Button" to trueset name of button "New Button" to TheNamechoose the browse toolshow bg button id 90put "Drag the new button where you want it and click the DONE Button"-- now construct temporary script for the new buttonput "on mouseStilldown" & return into buttonScriptput "put the name of me into tempname" & return after buttonscriptput "dragon " & tempname & return after buttonScriptput "end mouseStilldown" & return after buttonScriptset script of button TheName to buttonScript-- now construct script for the new buttonput "on mouseUp" & return into buttonScriptput "open " & quote & appl & quote & return after buttonScriptput "end mouseUp" & return after buttonScriptend ApplicationIt--------------------------------------------------------------------------- Quitters Never Win, and winners never quit...-----------------------------------------------------------------------on domenu whatglobal SuperU,SuperStudentChooser,SuperStudentControl,ShowFinderif there is a cd field id 273thenput item 1 of cd field id 273 of cd id 6381 into SuperStudentChooserput item 1 of cd field id 274 of cd id 6381 into SuperStudentControlend ifif what is "Quit HyperCard"thenif SuperU is falsethengo homeanswer "To quit, you must enter the password"send mouseup to bg button id 85elsepass domenuend ifelse if what contains "Control Panel"thenif SuperStudentControl is false and SuperU is falsethenset lockscreen to truepush cardgo homeanswer "You do not have access privileges to the Control Panel." with "OK"pop cardset lockscreen to falseelsepass domenuend ifelse if what contains "Chooser"thenif SuperStudentChooser is false and SuperU is falsethenset lockscreen to truepush cardgo homeanswer "You do not have access privileges to the Chooser." with "OK"pop cardset lockscreen to falseelsepass domenuend ifelse if what is "Hide Finder Under System 7"thenif ShowFinder is falsethenput true into cd field "Hide Finder" of cd id 6381set checkmark of menuitem 13 of menu "Administration" to falseput true into ShowFinderelseput FALSE into cd field "Hide Finder" of cd id 6381set checkmark of menuitem 13 of menu "Administration" to trueput false into ShowFinderend ifelse if what is "Message"thenbeepelsepass domenuend ifend domenu--------------------------------------------------------------------------- Making DA buttons-----------------------------------------------------------------------on MakeDAglobal fullPathglobal TheName,buttonScripthide msgput "" into TempListODasrepeat with x = 1 to number of menuitems of menu 1get menuitem x of menu 1if it is not "-"then put it & return after TempListODasend repeatif the number of lines of TempListODas = 1thenanswer "The Finder is closed now, and Apple menu items"¬&& " cannot be accessed when the Finder is closed. Consider using MacPassword with Student HomeCard™, and be sure to uncheck"¬&& "the" && quote & "Hide Finder" & quote && "menu item in the Administration menu."exit to HyperCardend ifget ListSelect ("1",TempListODas,"Select an Apple menu item to add as a button:")if it is empty then exit MakeDAput it into TheNamedoMenu "New Button"set style of button "New Button" to transparentset icon of button "New Button" to 27966choose button toolput ((the number of chars of thename) *6) into thewidthselect button "New Button"set rect of button "New Button" to 122,207,(122 + thewidth + 5),255set autohilite of button "New Button" to trueset name of button "New Button" to TheNamechoose the browse toolshow bg button id 90put "Drag the new button where you want it and click the DONE Button"-- now construct temporary script for the new buttonput "on mouseStilldown" & return into buttonScriptput "put the name of me into tempname" & return after buttonscriptput "dragon " & tempname & return after buttonScriptput "end mouseStilldown" & return after buttonScriptset script of button TheName to buttonScript-- now construct script for the new buttonput "on mouseUp" & return into buttonScriptput "domenu " & quote & theName & quote & return after buttonScriptput "end mouseUp" & return after buttonScriptend MakeDA--------------------------------------------------------------------------- Making Stack buttons-----------------------------------------------------------------------on MakeStackButtonglobal fullPathglobal TheName,buttonScripthide msgput "Select a stack to launch:" into fooanswer file foo of type STAKput it into fullPathput LastPathItem(fullpath) into TheNamerepeat with i = length of FullPath down to 1if character i of FullPath is ":"thenexit repeatelsedelete character i of FullPathend ifend repeatput return & fullpath after bg field id 6 of card "Stacks"if fullPath = empty then exit MakeStackButtondoMenu "New Button"hide button "New Button"show button "New Button"set style of button "New Button" to transparentset icon of button "New Button" to 1000choose button toolput ((the number of chars of thename) *6) into thewidthselect button "New Button"set rect of button "New Button" to 122,207,(122 + thewidth + 5),255set autohilite of button "New Button" to trueset name of button "New Button" to TheNamechoose the browse toolshow bg button id 90put "Drag the new button where you want it and click the DONE Button"-- now construct temporary script for the new buttonput "on mouseStilldown" & return into buttonScriptput "put the name of me into tempname" & return after buttonscriptput "dragon " & tempname & return after buttonScriptput "end mouseStilldown" & return after buttonScriptset script of button TheName to buttonScript-- now construct script for the new buttonput "on mouseUp" & return into buttonScriptput "go " & quote & theName & quote & return after buttonScriptput "end mouseUp" & return after buttonScriptend MakeStackButton--------------------------------------------------------------------------- About Dis'-----------------------------------------------------------------------on aboutSHCput GetMode() into Cstatusif item 2 of CStatus ≥ 4then put "1100" into Thatelse put "1000" into Thatanswer tab & "This stack may not be sold for profit or personal benefit, and may be distributed freely. "¬& return & tab & "ATG, Inc. makes no warranty, either expressed or implied, with respect to it's useability, suitability, or operation." with "OK"answer "For more information about Student HomeCard™ write to us at:" & return &¬tab & "ATG, Inc." & return & tab & "7954-A Mayfair Circle" & return & tab &¬"Ellicott City, MD 21043" & return &¬"or contact John Douglas via AppleLink™ at ATG" with "OK"picture That,resource, shadowend aboutSHCon mouseDownInPictureclose window "Logo"end mouseDownInPicture--------------------------------------------------------------------------- Dialog Hits------------------------------------------------------------------------- Password Hitson CPassWordHit dialog, itemHitdChanger dialog,"1◊NoDismiss"if itemhit = 6 or itemhit = 8thenput line 4 of dContents(dialog) into PassCheck1if passcheck1 ≠ cd field "Password Field" of cd id 6381thendChanger dialog,"9◊Password incorrect, please re-enter..."dChanger dialog,"1◊Inactivate"elsedChanger dialog,"9◊ "dChanger dialog,"1◊Activate"end ifelse if itemhit = 1thenput line 6 of dContents(dialog) into PassCheck2put line 8 of dContents(dialog) into PassCheck3if PassCheck2 = PassCheck3thendChanger dialog,"0◊Dismiss"elsedChanger dialog,"9◊New password entries do not match!"end ifend ifend CPassWordHiton PassWordHit dialog, itemHitdChanger dialog,"1◊NoDismiss"if itemhit = 1thenput line 5 of dContents(dialog) into PassCheck1put cd field "Password Field" of cd id 6381 into PassCheck2if PassCheck2 = PassCheck1thendChanger dialog,"0◊Dismiss"elsedChanger dialog,"3◊Incorrect password, please try again."end ifend ifend PassWordHit</script>
<background id="4099" file="background_4099.xml" name="Preferences" />
<background id="6552" file="background_6552.xml" name="Home Cards" />
<background id="16078" file="background_16078.xml" name="paths" />
<card id="6381" file="card_6381.xml" marked="false" name="Home" owner="6552" />
<card id="2678" file="card_2678.xml" marked="false" name="Stacks" owner="16078" />
<card id="3666" file="card_3666.xml" marked="false" name="Applications" owner="16078" />
<card id="3901" file="card_3901.xml" marked="false" name="Documents" owner="16078" />
<card id="5698" file="card_5698.xml" marked="false" name="User Preferences" owner="4099" />
</stack>